import request from '@/utils/request'

// 查询外部合作列表
export function listCooperation(query) {
  return request({
    url: '/cooperation/advertisement/list',
    method: 'get',
    params: query
  })
}

// 查询外部合作详细
export function getCooperation(advertiseId) {
  return request({
    url: '/cooperation/advertisement',
    method: 'get',
    params:{orderId:advertiseId}
  })
}

// 新增外部合作
export function addCooperation(data) {
  return request({
    url: '/cooperation/advertisement',
    method: 'post',
    data: data
  })
}

// 修改外部合作
export function updateCooperation(data) {
  return request({
    url: '/cooperation/advertisement',
    method: 'put',
    data: data
  })
}

// 删除外部合作
export function delCooperation(advertiseId) {
  return request({
    url: '/cooperation/advertisement/' + advertiseId,
    method: 'delete'
  })
}
